package com.skwyb.form.bean.req.admin;

import com.skwyb.form.bean.req.BaseSaveRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;

@Data
@EqualsAndHashCode(callSuper = true)
public class SaveAdminReq extends BaseSaveRequest {
    @ApiModelProperty("id")
    @Length(max = 36, message = "id too long")
    private String id;

    @ApiModelProperty("登录账户名")
    @NotBlank(message = "account is null")
    @Length(max = 50, message = "account too long")
    private String account;

    @ApiModelProperty("登录密码")
    @NotBlank(message = "password is null")
    @Length(min = 8, max = 50, message = "password too long")
    private String password;

    @ApiModelProperty("登录密码")
    @NotBlank(message = "repeatPassword is null")
    @Length(min = 8, max = 50, message = "repeatPassword too long")
    private String repeatPassword;

    @ApiModelProperty("用户名")
    @NotBlank(message = "userName is null")
    @Length(max = 50, message = "userName long")
    private String userName;

    @ApiModelProperty("注册邮箱")
    @Email(message = "email is illegal")
    @Length(max = 255, message = "email too long")
    private String email;

    @ApiModelProperty("注册手机")
    @Length(max = 20, message = "phone too long")
    private String phone;

    @ApiModelProperty("是否锁定，1是2否")
    @NotBlank(message = "isLocked is null")
    @Length(max = 10, message = "isLocked too long")
    private String isLocked = "2";

    @ApiModelProperty("是否系统预置，1是2否")
    @NotBlank(message = "isSystem is null")
    @Length(max = 10, message = "isSystem too long")
    private String isSystem = "2";
}